-- GENERATED SPELL FOR [Scourge Soulbinder] --


function spell0_32284(pUnit, Event) --@Chains of Ice,n/a--
pUnit:FullCastSpellOnTarget(22744,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32284', 11000, 1)
end

function spell1_32284(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(17620,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_32284', 5000, 1)
end

function spell2_32284(pUnit, Event) --@Frost Blast,n/a--
pUnit:FullCastSpellOnTarget(60814,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32284', 6000, 1)
end

function Sorts_32284(pUnit, Event)
local choix_sorts_32284 = math.random(0, 2)
if choix_sorts_32284 == 0 then
pUnit:RegisterEvent('spell0_32284', 1, 1)
end
if choix_sorts_32284 == 1 then
pUnit:RegisterEvent('spell1_32284', 1, 1)
end
if choix_sorts_32284 == 2 then
pUnit:RegisterEvent('spell2_32284', 1, 1)
end
end

function mob32284_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32284', math.random(1500, 3000), 1)
end

function mob32284_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32284_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32284_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32284, 1, 'mob32284_Action')
RegisterUnitEvent(32284, 2, 'mob32284_Leave')
RegisterUnitEvent(32284, 3, 'mob32284_Kill')
RegisterUnitEvent(32284, 4, 'mob32284_Die')
